import React from 'react';
import { FieldNodeSchema } from '@/app/codeTreeSlice';
import renderMptSpecialOffer from './renderMptSpecialOffer';
import JourneyAvailPackListProd from './JourneyAvailPackListProd';
import BillingTrendsWebProd from './BillingTrendsWebProd';
import UsageTrendsProd from './UsageTrendsProd';
import UsageTrendsProd2 from './UsageTrendsProd2';

export default function renderCardStyle(
  focusComponent: FieldNodeSchema | undefined,
  handleChange: (value: any, key: string) => void,
) {
  if (focusComponent?.type === 'MptSpecialOffer') {
    return renderMptSpecialOffer(focusComponent, handleChange);
  }
  if (focusComponent?.type === 'JourneyAvailPackListProd') {
    return <JourneyAvailPackListProd focusComponent={focusComponent} handleChange={handleChange} />;
  }
  if (focusComponent?.type === 'BillingTrendsWebProd') {
    return BillingTrendsWebProd(focusComponent, handleChange);
  }
  if (focusComponent?.type === 'UsageTrendsProd') {
    return UsageTrendsProd(focusComponent, handleChange);
  }
  if (focusComponent?.type === 'UsageTrendsProd2') {
    return UsageTrendsProd2(focusComponent, handleChange);
  }
  return <></>;
}
